<!--
 * @Author: your name
 * @Date: 2020-12-28 16:18:42
 * @LastEditTime: 2020-12-28 16:26:05
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \basiccss\box\fillavaliable.html
-->
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>自动撑满空间</title>
    <style>
        *{
            padding: 0;
            margin: 0;
        }
        body{
            width: 100vw;
            height: 100vh;
            background: #16a085;
        }
        /*
            box-sizeing:border-box 代表只改变内部的内边距   真实的内边距不会增加      也就是固定宽和高
        */
        main{
            background-color: #8e44ad;
            height: 100px;
            padding: 20px;
            box-sizing: border-box;
        }
        span{
            background-color: #16a085;
            display: inline-block;
            width: -webkit-fill-available;
            height: -webkit-fill-available;
        }
    </style>
</head>
<body>
    <main>
        <span>
            houdunren.com
        </span>
    </main>
</body>
</html>